﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CollsionCallback : MonoBehaviour
{
    public CallbackCollision2D OnCollision2DEnterCallback;
    public CallbackCollider2D OnTrigger2DEnterCallback;
    public CallbackCollider2D OnTrigger2DExitCallback;
    void Start()
    {
        
    }

    void Update()
    {
        
    }
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (OnTrigger2DEnterCallback != null)
            OnTrigger2DEnterCallback(collision);

    }
    private void OnTriggerExit2D(Collider2D collision)
    {
        if (OnTrigger2DExitCallback != null)
            OnTrigger2DExitCallback(collision);

    }

    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (OnCollision2DEnterCallback != null)
            OnCollision2DEnterCallback(collision);
    }
}
